package com.car.mgr.web.qdsl.entity;

import com.car.mgr.web.qdsl.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.io.Serializable;
import java.lang.Integer;
import java.lang.Long;
import java.lang.String;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import lombok.Data;
import lombok.ToString;

/**
 * "车辆行程表" */
@Entity
@Table(
    name = "wl_ov_app_t_vehicle_travel"
)
@Data
@ToString
public class WlOvAppTVehicleTravel implements Serializable, BaseEntity<Long> {
  private static final long serialVersionUID = 1L;

  /**
   * "行程ID" */
  @Id
  @GeneratedValue(
      strategy = GenerationType.IDENTITY
  )
  @Column(
      name = "travel_id"
  )
  private Long travelId;

  /**
   * "行程CODE" */
  @Column(
      name = "travel_code"
  )
  private String travelCode;

  /**
   * "异常信息记录" */
  @Column(
      name = "travel_name"
  )
  private String travelName;

  /**
   * "记录时间" */
  @Column(
      name = "log_time"
  )
  private LocalDateTime logTime;

  /**
   * "企业ID" */
  @Column(
      name = "enterprise_id"
  )
  private Integer enterpriseId;

  /**
   * "运营单位编码" */
  @Column(
      name = "operator_code"
  )
  private String operatorCode;

  /**
   * "运营单位名称" */
  @Column(
      name = "operator_name"
  )
  private String operatorName;

  /**
   * "车辆code" */
  @Column(
      name = "vehicle_code"
  )
  private String vehicleCode;

  /**
   * "关联用户" */
  @Column(
      name = "user_code"
  )
  private String userCode;

  /**
   * "设备CODE" */
  @Column(
      name = "device_code"
  )
  private String deviceCode;

  /**
   * "车牌号码" */
  @Column(
      name = "vehicle_number"
  )
  private String vehicleNumber;

  /**
   * "车架号" */
  @Column(
      name = "vin"
  )
  private String vin;

  /**
   * "车型ID" */
  @Column(
      name = "model_id"
  )
  private Integer modelId;

  /**
   * "车型名称" */
  @Column(
      name = "model_name"
  )
  private String modelName;

  /**
   * "排量" */
  @Column(
      name = "discharge"
  )
  private String discharge;

  /**
   * "燃油类型 1:汽油 2:柴油 3:压缩天然气（GNC）4:液化天然气（LNC）5:油电混合动力 6:电力" */
  @Column(
      name = "fuel_type"
  )
  private Integer fuelType;

  /**
   * "开始时间" */
  @Column(
      name = "start_time"
  )
  private LocalDateTime startTime;

  /**
   * "结束时间" */
  @Column(
      name = "end_time"
  )
  private LocalDateTime endTime;

  /**
   * "车_开始经度" */
  @Column(
      name = "start_longitude"
  )
  private BigDecimal startLongitude;

  /**
   * "车_开始纬度" */
  @Column(
      name = "start_latitude"
  )
  private BigDecimal startLatitude;

  /**
   * "车_结束经度" */
  @Column(
      name = "end_longitude"
  )
  private BigDecimal endLongitude;

  /**
   * "车_结束纬度" */
  @Column(
      name = "end_latitude"
  )
  private BigDecimal endLatitude;

  /**
   * "车_开始地址" */
  @Column(
      name = "start_address"
  )
  private String startAddress;

  /**
   * "车_结束地址" */
  @Column(
      name = "end_address"
  )
  private String endAddress;

  /**
   * "" */
  @Column(
      name = "start_address_zh"
  )
  private String startAddressZh;

  /**
   * "" */
  @Column(
      name = "end_address_zh"
  )
  private String endAddressZh;

  /**
   * "行程结束类型(1.正常熄火,2.30分钟主动熄火,3.点火再收到点火(补录熄火),4.熄火再收到熄火（补录点火）,5.30分钟强制-无历史GPS数据,6异常结束行程,7.完整行程记录,8.点火补传,9.熄火补传)" */
  @Column(
      name = "travle_end_type"
  )
  private Integer travleEndType;

  /**
   * "行程是否结束(0否，1是)" */
  @Column(
      name = "is_end"
  )
  private Integer isEnd;

  /**
   * "行程里程(km)" */
  @Column(
      name = "mileage"
  )
  private BigDecimal mileage;

  /**
   * "行程耗油量(L)" */
  @Column(
      name = "fuel"
  )
  private BigDecimal fuel;

  /**
   * "怠速油耗" */
  @Column(
      name = "lazy_speed_fuel"
  )
  private BigDecimal lazySpeedFuel;

  /**
   * "行驶百公里油耗" */
  @Column(
      name = "driving_avg_fuel"
  )
  private BigDecimal drivingAvgFuel;

  /**
   * "百公里油耗" */
  @Column(
      name = "avg_fuel"
  )
  private BigDecimal avgFuel;

  /**
   * "驾驶时间(H)" */
  @Column(
      name = "driver_time"
  )
  private BigDecimal driverTime;

  /**
   * "平均车速" */
  @Column(
      name = "avg_speed"
  )
  private BigDecimal avgSpeed;

  /**
   * "超速总次数" */
  @Column(
      name = "overspeed_times"
  )
  private Integer overspeedTimes;

  /**
   * "超速总距离(m)" */
  @Column(
      name = "overspeed_distance"
  )
  private BigDecimal overspeedDistance;

  /**
   * "超速总时长(s)" */
  @Column(
      name = "overspeed_duration"
  )
  private BigDecimal overspeedDuration;

  /**
   * "急加速次数" */
  @Column(
      name = "accelerate_times"
  )
  private Integer accelerateTimes;

  /**
   * "急减速次数" */
  @Column(
      name = "decelerate_times"
  )
  private Integer decelerateTimes;

  /**
   * "急转弯次数" */
  @Column(
      name = "sharp_turn_times"
  )
  private Integer sharpTurnTimes;

  /**
   * "疲劳驾驶总次数" */
  @Column(
      name = "fatigue_times"
  )
  private Integer fatigueTimes;

  /**
   * "疲劳驾驶总时长(s)" */
  @Column(
      name = "fatigue_duration"
  )
  private BigDecimal fatigueDuration;

  /**
   * "怠速次数" */
  @Column(
      name = "lazy_speed_times"
  )
  private Integer lazySpeedTimes;

  /**
   * "怠速时长(s)" */
  @Column(
      name = "lazy_speed_duration"
  )
  private BigDecimal lazySpeedDuration;

  /**
   * "空档滑行次数" */
  @Column(
      name = "neutral_times"
  )
  private Integer neutralTimes;

  /**
   * "行程油耗超标比值=（百公里油耗/额定油耗-1）*100" */
  @Column(
      name = "excess_ratio"
  )
  private BigDecimal excessRatio;

  /**
   * "行程开始油耗(L)" */
  @Column(
      name = "start_fuel"
  )
  private BigDecimal startFuel;

  /**
   * "行程结束油耗(L)" */
  @Column(
      name = "end_fuel"
  )
  private BigDecimal endFuel;

  /**
   * "行程起始里程数(km)" */
  @Column(
      name = "start_mileage"
  )
  private BigDecimal startMileage;

  /**
   * "行程结束里程数(km)" */
  @Column(
      name = "end_mileage"
  )
  private BigDecimal endMileage;

  /**
   * "行程里程汇总方式(1.仪表盘,2.OBD累计,3.GPS累计)" */
  @Column(
      name = "mileage_types"
  )
  private Integer mileageTypes;

  /**
   * "行程耗油量汇总方式(1.仪表盘,2.CAN累计,3.总电池放电功率,4.SOC,5.不支持)" */
  @Column(
      name = "fuel_types"
  )
  private Integer fuelTypes;

  /**
   * "车辆是否支持OBD(0不支持，1支持)" */
  @Column(
      name = "is_obd"
  )
  private Integer isObd;

  /**
   * "行程数据是否汇总成功(0否，1是)" */
  @Column(
      name = "is_summary"
  )
  private Integer isSummary;

  /**
   * "行程是否有效(0否，1是)" */
  @Column(
      name = "is_problem"
  )
  private Integer isProblem;

  /**
   * "是否异常行程,汇总数据异常(0否，1是)" */
  @Column(
      name = "is_error"
  )
  private Integer isError;

  /**
   * "本次行程驾驶评分值在0-100之间" */
  @Column(
      name = "score"
  )
  private BigDecimal score;

  /**
   * "是否显示(0否，1是)" */
  @Column(
      name = "is_show"
  )
  private Integer isShow;

  /**
   * "原始里程值KM" */
  @Column(
      name = "mileage_original"
  )
  private BigDecimal mileageOriginal;

  /**
   * "原始油耗值L" */
  @Column(
      name = "fuel_original"
  )
  private BigDecimal fuelOriginal;

  /**
   * "重算时间" */
  @Column(
      name = "calculation_time"
  )
  private LocalDateTime calculationTime;

  /**
   * "重算次数" */
  @Column(
      name = "calculation_times"
  )
  private Integer calculationTimes;

  /**
   * "原始开始时间参考值" */
  @Column(
      name = "ref_start_time"
  )
  private Long refStartTime;

  /**
   * "原始结束时间参考值" */
  @Column(
      name = "ref_end_time"
  )
  private Long refEndTime;

  @JsonIgnore
  public Long getPrimaryKey() {
    return this.travelId;
  }
}
